///////////////////////////////////////////////////////////////
// Copyright(c) ephiroth
// 
// FileName : formula_2plusquare.c
// Creator  : ephiroth
// E-Mail   : ephiroth@gmail.com
// Date     : 2009-04-09
// Comment  : 
//
///////////////////////////////////////////////////////////////
#include "comm.h"

static int func_2plusquare (int index, U8 * data)
{
	int ret ;
	int m, l;
	m = trim_char(data[21],1,3);
	l = trim_char(data[22],1,4);

	ret =   m+(l*index*(index+1))/2;
return ret * ret ;
}


static void help_2plusquare ( U8 * data )
{
	int m , l ;
	m = trim_char ( data [21],1,3);
	l = trim_char ( data [22],1,4);
	printf("[二次加成的平方]%d+(%d*index*(index+1))/2的平方\n", m , l );
}


formula  formula_2plusquare = {
	"2plus square ",
	ft_normal, 
	10,
	func_2plusquare,
	help_2plusquare,
};



